﻿<sdk:Page xmlns:Extensions="clr-namespace:Sakura.Silverlight.Extensions;assembly=SLExtension"  
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:Control="clr-namespace:Galnote.Control" x:Class="Galnote.Upload.Upload"
           mc:Ignorable="d"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Upload Page">
	<navigation:Page.Resources>
		<ItemsPanelTemplate x:Key="IPT4x6">
			<Extensions:UniformGrid Rows="4" Columns="6"/>
		</ItemsPanelTemplate>
		<ItemsPanelTemplate x:Key="IPT3x5">
			<Extensions:UniformGrid Rows="3" Columns="5"/>
		</ItemsPanelTemplate>
	</navigation:Page.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="1*"/>
			<ColumnDefinition Width="0"/>
		</Grid.ColumnDefinitions>
		<sdk:TabControl Style="{StaticResource ResourceKey=SwitchTopLeftStyle}" TabStripPlacement="Top" Margin="4,0">
			<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="壁纸">
				<Grid>
					<!---->
					<sdk:TabControl Style="{StaticResource ResourceKey=SwitchRightBottomStyle}" TabStripPlacement="Right">
						<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemRightTemplate}" Header="1.自制" Width="60">
							<Grid>
						   <Line X1="0" X2="0" Y1="0" Y2="4000" Stretch="Fill" Stroke="#FFB4B4B4" StrokeDashArray="8,3" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="220" Margin="0,0,0,50"/>
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition Height="Auto"/>
										<RowDefinition Height="1*"/>
										<RowDefinition Height="50"/>
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
									<ColumnDefinition Width="0.32*" MaxWidth="330"/>
										<ColumnDefinition Width="1*"/>
									</Grid.ColumnDefinitions>
					<!--Info Input Tool UserControl-->
					<Control:UploadInput Grid.RowSpan="2" />
					<!--Upload Image List-->
					<ScrollViewer Grid.Column="1" Style="{StaticResource ResourceKey=GenericSVStyle}" Grid.Row="1" Grid.RowSpan="2">
						<ListBox x:Name="UploadList" Style="{StaticResource ResourceKey=GenericLBStyle}" ItemsPanel="{StaticResource IPT4x6}" Padding="15" Loaded="UploadList_Loaded">
							<ListBox.ItemContainerStyle>
								<Style TargetType="ListBoxItem">
									<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
									<Setter Property="VerticalContentAlignment" Value="Stretch"/>
									<Setter Property="Margin" Value="5"/>
									<Setter Property="Template" Value="{StaticResource ResourceKey=GenericLBITemplate}"/>
								</Style>
							</ListBox.ItemContainerStyle>
							<ListBox.ItemTemplate>
								<DataTemplate>
									<Extensions:RatioBox Ratio="1.6">
										<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" BorderBrush="#FFB4B4B4">
											<Border BorderBrush="#FFB4B4B4" BorderThickness="1">
												<Grid>
													<!--
											<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="8,2" Canvas.ZIndex="3"/>
												-->
													<CheckBox VerticalAlignment="Top" HorizontalAlignment="Right" Canvas.ZIndex="2"/>
													<Image Source="{Binding Path=Image}" Stretch="Uniform" Canvas.ZIndex="1" Margin="2"/>
												</Grid>
											</Border>
										</Button>
									</Extensions:RatioBox>
								</DataTemplate>
							</ListBox.ItemTemplate>
						</ListBox>
					</ScrollViewer>
					<Grid Grid.Column="1">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="auto"/>
							<ColumnDefinition Width="1*"/>
							<ColumnDefinition Width="auto"/>
						</Grid.ColumnDefinitions>
						<sdk:DataPager x:Name="UploadImageListPG" Grid.Column="4" PageSize="24" MaxWidth="200" HorizontalAlignment="Right"/>
						<StackPanel Orientation="Horizontal">
							<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Height="36" Margin="10,0">
								<Grid>
									<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
									<TextBlock Text="移除内容" HorizontalAlignment="Center" VerticalAlignment="Center"/>
								</Grid>
							</Button>
							<Button Style="{StaticResource ResourceKey=GenericBtnStyle}" Width="75" Height="36" Margin="10,0">
								<Grid>
									<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2" Width="75"/>
									<TextBlock Text="图片归类" HorizontalAlignment="Center" VerticalAlignment="Center"/>
								</Grid>
							</Button>
						</StackPanel>
					</Grid>
					<Button Grid.Row="4" Style="{StaticResource ResourceKey=GenericBtnStyle}" Height="36">
						<Grid>
							<Rectangle Stroke="#FFB4B4B4" StrokeDashArray="5,2"/>
							<TextBlock Text="确认上传" HorizontalAlignment="Center" VerticalAlignment="Center"/>
						</Grid>
					</Button>

				</Grid>
	</Grid>
	</sdk:TabItem>
	<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemRightTemplate}" Header="2.动画" Width="60">
		<Grid/>
	</sdk:TabItem>
	</sdk:TabControl>
	<!---->
				</Grid>
			</sdk:TabItem>
			<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="图片">
				<Grid/>
			</sdk:TabItem>
			<sdk:TabItem Style="{StaticResource ResourceKey=SwitchTabItemTopTemplate}" Header="漫画">
				<Grid/>
			</sdk:TabItem>
		</sdk:TabControl>
	
	</Grid>
</sdk:Page>
